unit uGlobal;

interface

uses
  Classes;
  
type
  TCommonThreadMethod = procedure(Data: TObject) of object;
  TCommonThread = class(TThread)
  private
    FThreadMethod: TCommonThreadMethod;
    FData: TObject;
  protected
    procedure Execute; override;
  public
    property ThreadMethod: TCommonThreadMethod read FThreadMethod write FThreadMethod;
    property Data: TObject read FData write  FData;
  end;
  
implementation

{ TCommonThread }

procedure TCommonThread.Execute;
begin
  if Assigned(FThreadMethod) then
    FThreadMethod(FData);
end;

end.
